package com.yjx.managedemo.handler;


import com.yjx.managedemo.re.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author: OlderHard
 * @CreateTime: 2025-01-02
 * @Description: 统一异常处理
 * @Version: 1.0
 */

@RestControllerAdvice
public class AllExceptionHandler {
    @ExceptionHandler(Exception.class)
    public Result doException(Exception e) {
        e.printStackTrace();
        return Result.fail("系统异常");
    }
}
